<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="newtemplatesfiles5/img/favicon.html">

    <title>开通钱包</title>

    <!-- Bootstrap core CSS -->
    <link href="newtemplatesfiles5/css/bootstrap.min.css" rel="stylesheet">
    <link href="newtemplatesfiles5/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="newtemplatesfiles5/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="newtemplatesfiles5/css/style.css" rel="stylesheet">
    <link href="newtemplatesfiles5/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="newtemplatesfiles5/js/html5shiv.js"></script>
    <script src="newtemplatesfiles5/js/respond.min.js"></script>
    <![endif]-->
    <!--webuoploader-->
    <link rel="stylesheet" type="text/css" href="webuploader/css/webuploader.css" />
    <link rel="stylesheet" type="text/css" href="webuploader/examples/image-upload/style.css" />

</head>

<body>

<section id="container" class="">
    <!--header start-->
    <div th:insert="common/student-common-header::top"></div>
    <!--header end-->
    <!--sidebar start-->
    <div th:insert="common/student-common-sidebar::#left"></div>
    <!--sidebar end-->
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper">
            <!-- page start-->
            <div class="row">
                <!--schoolCounsellor-stuEibck-left  start-->
                <div th:insert="common/student-sell-left::#student-sell-left"></div>
                <!--schoolCounsellor-stuEibck-left  end-->
                <aside class="profile-info col-lg-9">
                    <!--widget start-->
                    <section class="panel">
                        <div class="bio-graph-heading">
                            <h2>你还没有开通钱包功能，设置密码开通吧</h2>
                        </div>
                        <div class="panel-body">
                            <form id="walletForm">
                                <div class="form-group">
                                    <label>支付密码:</label>
                                    <input id="password1" name="password" type="password" class="form-control">
                                </div>
                                <div class="form-group">
                                    <label>确认密码:</label>
                                    <input name="correctPassword"  type="password" class="form-control" >
                                </div>
                            </form>
                            <button type="submit" class="btn btn-info" onclick="mysubmit()">提交</button>
                        </div>
                    </section>
                    <!--widget end-->

                </aside>
            </div>
            <!-- page end-->
        </section>
    </section>
    <!--main content end-->

</section>
<!--webuploader-->
<script type="text/javascript" src="webuploader/examples/image-upload/jquery.js"></script>
<script type="text/javascript" src="webuploader/dist/webuploader.js"></script>
<script type="text/javascript" src="webuploader/examples/image-upload/upload.js"></script>

<!-- js placed at the end of the document so the pages load faster -->
<script src="newtemplatesfiles5/js/bootstrap.min.js"></script>
<script src="newtemplatesfiles5/assets/jquery-knob/js/jquery.knob.js"></script>


<!--common script for all pages-->
<script src="newtemplatesfiles5/js/common-scripts.js"></script>

<script>
    window.onload=function(){
        $("#li1").removeClass('active');
        $("#li2").removeClass('active');
        $("#li3").removeClass('active');
        $("#li4").removeClass('active');
        $("#li5").removeClass('active');
        $("#li6").addClass('active');

    };
    //knob
    $(".knob").knob();


    function mysubmit(){
        var password1 = document.getElementById("password1").value;
        if(password1.length<6){
            alert("密码不能少于6位");
        }else{
            var form = new FormData(document.getElementById("walletForm"));
            $.ajax({
                url:"student-TocreatOneWallet.do",
                type:"post",
                dataType:"html",
                data:form,
                cache:false,
                processData:false,
                contentType:false,
                success: function (data) {
                    if(data=="success"){
                        alert("开通成功！");
                        location.href="student-getMyWallet.do";
                    }else {
                        alert(data);
                    }
                },
                error:function (e) {
                    console.log(e);
                    alert("开通失败");
                }
            })
        }

    };


</script>




</body>
</html>
